import React from 'react';
import { Switch, Route, Redirect } from 'react-router-dom';
import { userRoutes } from '../router';
import './App.css';

function User() {
  return (
    <Switch>
      {userRoutes.map(route => {
        return (
          <Route
            key={route.path}
            path={route.path}
            exact={route.exact}
            render={routeProps => {
              return <route.component {...routeProps} />;
            }}
          />
        );
      })}
    </Switch>
  );
}

export default User;
